<?php
declare(strict_types=1);
/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://gitee.com/xmo/MineAdmin
 */
namespace App\Admin\Request;

use Mine\MineFormRequest;

/**
 * 订单列表验证数据类
 */
class OrderRequest extends MineFormRequest
{
    /**
     * 公共规则
     */
    public function commonRules(): array
    {
        return [];
    }

    /**
     * 新增数据验证规则
     * return array
     */
    public function saveRules(): array
    {
        return [

        ];
    }
    /**
     * 更新数据验证规则
     * return array
     */
    public function updateRules(): array
    {
        return [

        ];
    }

    public function operateAssignStaffRules(): array
    {
        return [
            'staff_id' => 'required|integer|gt:0'
        ];
    }
    
    /**
     * 字段映射名称
     * return array
     */
    public function attributes(): array
    {
        return [
            'id' => '',
            'member_id' => '用户ID',
            'car_id' => '车辆ID',
            'channel_id' => '渠道ID',
            'staff_id' => '员工ID',
            'no' => '订单号',
            'city' => '城市',
            'address' => '地址',
            'start_at' => '开始时间',
            'end_at' => '结束时间',
            'day' => '租车天数',
            'price' => '租车单价',
            'cleaning_fee' => '清洁费',
            'service_fee' => '服务费',
            'insurance_price' => '保险单价',
            'total_price' => '总价格',
            'pay_no' => '支付单号',
            'pay_status' => '支付状态',
            'is_delivery' => '是否送达',
            'status' => '状态',

        ];
    }
}